﻿$(document).ready(function () {
    $('#left_left').height($(document).height());
    //设置导航栏目的打开/关闭图标
    $('div.l-c-top').each(function (idx, el) {
        var a = $(el).find('.l-c-t-a');
        a.click(function () { showsubmenu(el); });
        if ($(el).find('.l-c-t-b').css("display") == "none") {
            a.css("background", "url(../images/left_c_t_off.gif)");
        }
        else {
            a.css("background", "url(../images/left_c_t_on.gif)");
        }
    });
});

//切换导航栏的打开/关闭状态
function showsubmenu(menu) {
    var submenu = $(menu).find('.l-c-t-b');
    var imgmenu = $(menu).find('.l-c-t-a');
    if (submenu.css("display") == "none") {
        submenu.css("display", "");
        imgmenu.css("background", "url(../images/left_c_t_on.gif)");
    }
    else {
        submenu.css("display", "none");
        imgmenu.css("background", "url(../images/left_c_t_off.gif)");
    }
}